<?php
namespace app\agent\controller;
use app\agent\controller\BaseController;

class ShopController  extends BaseController {

	protected function _initialize() {
		parent::_initialize();
	}

	
	public function goods() {
		return $this->fetch();
	}
	
	function goods_add(){
		//获取平台分类
		$platform_type = db('sys_cate')->select();
		//1级分类
		$platform_1 = array();
		//2级分类
		$platform_2 = array();
		foreach($platform_type as $key=>$values){
			if($values['pid'] == 0){
				$platform_1[] = $values;
			}else{
				$platform_2[$values['pid']][] = $values;
			}
		}
		$this->assign('platform_1',$platform_1);
		$this->assign('platform_2',$platform_2);
		//获取商家分类
		$agent_type = db('good_cate')->select();
		$this->assign('agent_type',$agent_type);
		
		
		
		if(request()->isPost()){
			
			
			
		}
		
		return $this->fetch();
	}

	
	
	
	
	
}
